<!DOCTYPE html>
<html>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	String serveUrl = basePath+"hantangapi/v2/";
	//获取内容
%>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>医生管理后台-文章编辑</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="description" content="Page description">
		<meta name="author" content="loopwang">
		<meta charset="utf-8">
		<link href="../css/bootstrap.min.css" rel="stylesheet">
		<link href="../css/bootstrap-responsive.min.css" rel="stylesheet">
		<!--[if lt IE 9]>
			<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
		<![endif]-->
		<script type="text/javascript">
			var g_action = "<%=serveUrl%>";
		</script>
	</head>	
	<body>
		<!-- #include file = "myfile.inc" --> 
		<div class="container">
				<div class="row"><h2 align="center">发表文章</h2></div>
				<form class="bs-docs-example form-horizontal">
		            <div class="control-group">
		              <label class="control-label">标题:</label>
		              <div class="controls">
		                <input type="text"  class="span7 title" placeholder="请使用直观易懂的标题">
		              </div>
		            </div>
		            <div class="control-group">
		              <label class="control-label">文章内容:</label>
		              <div class="controls">
						<textarea class="span10 content" rows="30" cols="100"></textarea>
				      </div>
		            </div>
		              <div class="controls">
		                <button id="publishbtn" class="btn">确认发表</button>
		              </div>
		          </form>
		         
        </div>
         <!-- Placed at the end of the document so the pages load faster -->
    	<script src="../js/jquery.min.js"></script>
    	<script src="../js/bootstrap.min.js"></script>
		<script src="../js/business.js"></script>
		<script>
			$(function(){
				$("#publishbtn").click(function(){
					var title = $(".control-label title").val();
					var content = $(".control-label content").val();
					Article.modify({title:title,content:content});
				})
			});
		</script>
	</body>
</html>